package com.dubito.coil

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.ImageView
import coil.Coil
import coil.api.load
import coil.api.loadAny
import coil.request.GetRequest
import coil.transform.BlurTransformation
import coil.transform.CircleCropTransformation
import coil.util.CoilUtils
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

    private val imageUrl = "http://gank.io/images/f4f6d68bf30147e1bdd4ddbc6ad7c2a2"

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        imageView.load(imageUrl) {
            crossfade(true)
            placeholder(R.drawable.ic_launcher_background)
            error(R.drawable.ic_launcher_foreground)
        }
    }
}
